﻿using EmbeddedSharp.Scripting;

namespace EmbeddedSharp.Scripting.Visualization
{
    public class VisualizationContextFuncNode : ContextFuncNode
    {
        public VisualizationContextFuncNode()
            : base()
        {
        }

        public VisualizationContextFuncNode(IContext context)
            : base()
        {
            this.Context = context;
        }

        /// <summary>
        /// With function name in constructor
        /// </summary>
        /// <param name="value"></param>
        public VisualizationContextFuncNode(string value)
            : base(value)
        {
        }

        public VisualizationContextFuncNode(string name, IContext context)
            : base(name)
        {
            this.Context = context;
        }

        private static IVisualizationProvider provider = null;

        public static IVisualizationProvider Provider
        {
            get
            {
                if (provider == null)
                {
                    PlotView view = new PlotView();
                    view.Show();
                }

                return provider;
            }
            set
            {
                provider = value;
            }
        }

        public override object Evaluate()
        {
            throw new System.NotImplementedException();
        }
    }
}
